﻿CREATE TABLE [dbo].[WorkOrder] (
    [ID]                     INT           IDENTITY (1, 1) NOT NULL,
    [AssetID]                INT           NOT NULL,
    [RequirementType]        INT           NOT NULL,
    [Description]            VARCHAR (MAX) NULL,
    [IsPosted]               BIT           NOT NULL,
    [DateOpened]             DATETIME      NULL,
    [DateDue]                DATETIME      NOT NULL,
    [Status]                 INT           NOT NULL,
    [BasedOnRequirementID]   INT           NULL,
    [IsAutomaticallyCreated] BIT           NOT NULL,
    [DateCreated]            DATETIME      NOT NULL,
    [CreatedBy]              INT           NULL,
    [PerformedBy]            INT           NULL,
    [PerformedDate]          DATETIME      NULL,
    [HasException]           BIT           NOT NULL,
    [ApprovedBy]             INT           NULL,
    [ApprovedDate]           DATETIME      NULL,
    [ReviewType]             INT           NOT NULL
);

